# from flask import Flask, render_template
#
#
# app = Flask(__name__)

books = [
    {
        "title": "JavaScript Pattern",
        "ID": 1,
        "price": 89.9
    },
    {
        "title": "JavaScript Compact",
        "ID": 2,
        "price": 129.9
    },
    {
        "title": "计算机组成原理",
        "ID": 3,
        "price": 149.9
    },
    {
        'title': 'CSS+HTML+JS',
        "ID": 4,
        "price": 12.9
    },
    {
        'title': 'MySQL + Linux',
        "ID": 5,
        "price": 168.9
    }
]


# @app.route('/')
# def index():
#     return render_template('index.html', books=Books)
#
#
# @app.get('/books')
# def get_books():
#     return str(Books)
#
#
# @app.get('/book/<int:id>')
# def get_book(id):
#     return Books.index({'ID': id})
#
#
# @app.post('/book')
# def add_books() -> None:
#     data = {
#                'title': 'name',
#                'price': 19.9,
#                'id': Books[-1]['ID'] + 1
#            },
#     return Books.append(data)
#
#
# if __name__ == '__main__':
#     app.run(host='0.0.0.0', debug=True)
